<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta charset="UTF-8">
			<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/css/base2.css">
		<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/css/style2.css">
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-2.1.4.min.js"></script>
		<title>账户管理-修改密码</title>
	</head>
	<body>
		<div class="page">
			<div class="main_menu fl">
				<c:forEach items="${sessionScope.MENU_LIST}" var="mainMenu">
					<c:if test="${mainMenu.wOOpid == 4}">
						<div class="menu_name">
							<a href="${pageContext.request.contextPath}/${mainMenu.wOAction}"
								target="main"> <img
								src="${pageContext.request.contextPath}${mainMenu.wOIcon}">
								<p>${mainMenu.wOName}</p>
							</a>
						</div>
					</c:if>
				</c:forEach>
			</div>
			
				<div class="main_cont fl">
					<div class="main_cont_top">
						<div class="main_inner">
							
						</div>
					</div>
					<div class="main_cont_bottom_password">
						<h3><img src="${pageContext.request.contextPath}/images/images/mima.png">修改密码</h3>
						<form action="${pageContext.request.contextPath}/admin/updatePassword.html" method="post" id="myform">
							<p class="xiugai"><span>原密码：</span><input type="password" id="oldpassword" name="oldpassword"></p>
							<p class="xiugai"><span>新密码：</span><input type="password" id="newpassword" name="newpassword"></p>
							<p class="xiugai"><span>确认密码：</span><input type="password" id="newpassword2" name="newpassword2"></p>
							<p class="xiugai_qr"><input type="button" value="确认修改" onclick="checkValue();"></p>
						</form>
					</div>
				</div>
			</div>
		</div>
		<script type="text/javascript">
		function checkValue(){
			var oldp=$("#oldpassword").val();
			if(oldp==null || oldp==""){
				alert("请输入原密码！");
				return false;
			}
			var wAPassword=$("#newpassword").val();
			if(wAPassword==null || wAPassword==""){
				alert("请输入密码！");
				return false;
			}
			var password=$("#newpassword2").val();
			if(password==null || password==""){
				alert("请输入确认密码！");
				return false;
			}
			if(password!=wAPassword){
				alert("输入密码和确认密码不一致！");
				return false;
			}
			
			$("#myform").submit();
		}
		</script>
	</body>
</html>
